import { useState, useRef } from "react";
import Child from "./Child";

export default function Parent() {
    const [list, setList] = useState([1, 2, 3]);

    return (
        <div className="App">
            <Child setList={setList} />
            <div className="bd">
                <ul>
                    {list.map((item, index) => {
                        return <li key={index}>{item}</li>
                    })}
                </ul>
            </div>
        </div>
    );
}
